<?php
namespace App\Http\Controllers\Admin\App;

use App\admin\TableView\NewsView;
use App\Services\Admin\NewsService;
use App\Utilities\JiugeForm;
use Illuminate\Http\Request;

class NewsController extends BaseController
{
    /**
     * 资讯
     */

    protected $view = 'admin.app.news.';//视图前缀
    protected $url = 'news';//路由前缀
    protected $model;

    public function __construct()
    {
        parent::__construct();
        $this->prefix_url = $this->prefix_url.'/'.$this->url;
        $this->model = new NewsService();
        view()->share('prefix_url',$this->prefix_url);
        view()->share('jiugeForm',new JiugeForm($this->prefix_url));
    }

    public function index()
    {
        /*
        $models = $this->model->getIndex();
        return view($this->view.'index',array(
            'datas' => $models,
        ));*/
        return (new NewsView())->get_html($this);
    }
}
